
from util.selenium.webdriver.common.by import By

from base.BaseMethod import BM
from util.DataQuery.FormDataDecorator import FormDataDecorator


class WriteHRSubinfo():
    ent_doctor_loc = (By.CSS_SELECTOR, 'input#entHrDoctor')
    ent_master_loc = (By.CSS_SELECTOR, 'input#entHrMaster')
    ent_bachelor_loc = (By.CSS_SELECTOR, 'input#entHrBachelor')
    ent_junior_loc = (By.CSS_SELECTOR, 'input#entHrJunior')
    ent_senior_loc = (By.CSS_SELECTOR, 'input#entHrSenior')
    ent_middle_loc = (By.CSS_SELECTOR, 'input#entHrMiddle')
    ent_primary_loc = (By.CSS_SELECTOR, 'input#entHrPrimary')
    ent_mechanic_loc = (By.CSS_SELECTOR, 'input#entHrMechanic')
    ent_age1_loc = (By.CSS_SELECTOR, 'input#entHrAge1')
    ent_age2_loc = (By.CSS_SELECTOR, 'input#entHrAge2')
    ent_age3_loc = (By.CSS_SELECTOR, 'input#entHrAge3')
    ent_age4_loc = (By.CSS_SELECTOR, 'input#entHrAge4')

    def __init__(self, driver=None):
        self.driver = driver
    @property
    def class_name(self):
        return self.__class__.__name__



    def write_hr_subinfo(self, doctor=None, md=None, bd=None, coll=0, senior=0, medium=0, primary=0, snengr=0, age30al=0, age40al=0, age50al=0, age51au=0):
        return {"dataEntHumanres.entHrDoctor": doctor, "dataEntHumanres.entHrMaster": md,
                "dataEntHumanres.entHrBachelor": bd, "dataEntHumanres.entHrJunior": coll,
                "dataEntHumanres.entHrSenior":senior, "dataEntHumanres.entHrMiddle": medium,
                "dataEntHumanres.entHrPrimary": primary, "dataEntHumanres.entHrMechanic": snengr,
                "dataEntHumanres.entHrAge1": age30al, "dataEntHumanres.entHrAge2": age40al,
                "dataEntHumanres.entHrAge3": age50al, "dataEntHumanres.entHrAge4": age51au}
